#ifndef LINK_ELSE_LOONGSON_DIALOG_H
#define LINK_ELSE_LOONGSON_DIALOG_H

#include <QDialog>
#include <QTcpSocket>

namespace Ui {
class link_else_loongson_dialog;
}

class link_else_loongson_dialog : public QDialog
{
    Q_OBJECT

private:
    QTcpSocket *socket = nullptr;   //客户端套接字

private:
    QString getLocalIP(void);

public:
    explicit link_else_loongson_dialog(QWidget *parent = nullptr);
    ~link_else_loongson_dialog();

private slots:
    void on_connected();    //连接服务器成功槽函数

    void on_connect_btn_clicked();

    void on_disconnected(void); //连接断开处理槽函数

    void on_disconnect_btn_clicked();

    void on_rd_edit_cle_btn_clicked();

    void on_send_data_btn_clicked();

private:
    Ui::link_else_loongson_dialog *ui;
};

#endif // LINK_ELSE_LOONGSON_DIALOG_H
